package com.example.demo.service;

import com.example.demo.mapper.CourseMapper;
import com.example.demo.pojo.Course;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CourseServiceImpl implements CourseService{

    @Autowired
    private CourseMapper courseMapper;
    @Override
    public List<Course> queryCourse() {
        return courseMapper.queryCourse();
    }

    @Override
    public void addCourse(String course_name, int teacher_id, int classes_id) {
        courseMapper.addCourse(course_name,teacher_id,classes_id);
    }

    @Override
    public void updateCourse(Course course) {
        courseMapper.updateCourse(course);
    }

    @Override
    public void deleteCourse(int id) {
        courseMapper.deleteCourse(id);
    }
}
